package com.example.managemyself.data.model;

import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.room.Index;
import java.util.Date;

@Entity(tableName = "health_data", indices = {@Index(value = "date", unique = true)})
public class HealthData {

    @PrimaryKey(autoGenerate = true)
    private int id;
    
    @NonNull
    private Date date;

    private float weight; // in kg
    private float height; // in cm
    private float sleepHours;
    private String mood; // e.g., "Happy", "Neutral", "Sad"
    private int energyLevel; // 1 to 5

    public HealthData(@NonNull Date date, float weight, float height, float sleepHours, String mood, int energyLevel) {
        this.date = date;
        this.weight = weight;
        this.height = height;
        this.sleepHours = sleepHours;
        this.mood = mood;
        this.energyLevel = energyLevel;
    }

    // Getters
    public int getId() {
        return id;
    }
    
    @NonNull
    public Date getDate() {
        return date;
    }

    public float getWeight() {
        return weight;
    }

    public float getHeight() {
        return height;
    }

    public float getSleepHours() {
        return sleepHours;
    }

    public String getMood() {
        return mood;
    }

    public int getEnergyLevel() {
        return energyLevel;
    }

    // Setters
    public void setId(int id) {
        this.id = id;
    }
    
    public void setDate(@NonNull Date date) {
        this.date = date;
    }

    public void setWeight(float weight) {
        this.weight = weight;
    }

    public void setHeight(float height) {
        this.height = height;
    }

    public void setSleepHours(float sleepHours) {
        this.sleepHours = sleepHours;
    }

    public void setMood(String mood) {
        this.mood = mood;
    }

    public void setEnergyLevel(int energyLevel) {
        this.energyLevel = energyLevel;
    }
} 